package com.echoplots.json.entity;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonView;
//7.@JsonView，作用在类或者属性上，用来定义一个序列化组。 比如对于User对象，某些情况下只返回userName属性就行，而某些情况下需要返回全部属性
public class Teacher implements Serializable {
    private static final long serialVersionUID = 6222176558369919436L;
    
    
    public interface TeacherNameView {};
    public interface AllTeacherFieldView extends TeacherNameView {};
    
    @JsonView(TeacherNameView.class)
	private String userName;
    @JsonView(AllTeacherFieldView.class)
	private Date birthday;
    @JsonView(AllTeacherFieldView.class)
    private int age;
    @JsonView(AllTeacherFieldView.class)
    private String password;
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
    

}
